<?php
require_once 'model/User.php';
require_once 'vo/UserVO.php';

class UserService 
{	
	private $userservice;
	
	public function __construct()
	{
		$this->userservice = User::getInstance();
	}
	
	public function saveUser(UserVO $user)
	{
		return $this->userservice->saveUser($user);
	}
	
	public function updateUser(UserVO $user)
	{
		return $this->userservice->updateUser($user);
	}
	
	public function listUser()
	{
		return $this->userservice->listUser(UserVO::ADMIN);
	}
	
	public function deleteUser(UserVO $user)
	{
		return $this->userservice->deleteUser($user->idUser);
	}
	
	public function searchUser($name)
	{
		return $this->userservice->searchUser($name, UserVO::ADMIN);
	}
}